package ylg.com.cn.youtube._data.source.remote;

import android.content.Context;
import android.os.AsyncTask;
import android.support.annotation.Nullable;

import java.util.ArrayList;
import java.util.List;

import ylg.com.cn.youtube._data.Video;
import ylg.com.cn.youtube._data.source.VideoDataSource;

/**
 * Created by MyPC on 2017/1/11.
 */
public class VideoRemoteDataSource implements VideoDataSource {

    String TAG = VideoRemoteDataSource.class.getName();
    private final Context ctx;

    public VideoRemoteDataSource(Context ctx) {
        this.ctx = ctx;
    }

    @Override
    public void getHomePageVideos(@Nullable String usertoken, @Nullable int lastOneId, GetVideosCallBack callBack) {
/* 通过网络请求获取视频信息*/
        final String link = /*API.VIDEOS+*/"";
        new AsyncTask<Video,Void,Video>(){
            @Override
            protected Video doInBackground(Video... params) {
                return null;
            }

            @Override
            protected void onPostExecute(Video s) {
                super.onPostExecute(s);
                List<Video> list = new ArrayList();
                for(int i = 0 ;i<5;i++){

                }
            }
        };
    }

    @Override
    public void getHomePageVideosByCategory(@Nullable Video.Category category, @Nullable String usertoken, @Nullable int lastOneId, GetVideosCallBack callBack) {

    }
}
